package com.jbm.jbmsupplier.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.jbm.jbmsupplier.view.AdaViewHolder;

import java.util.ArrayList;

/**
 * Created by 家帮忙 on 2017/4/11.
 */

public abstract class AllAdapterActivity<T> extends BaseAdapter {
    private Context context;
    private ArrayList<T> alldateList;
    private int layout;




    public AllAdapterActivity(Context context, ArrayList<T> alldateList, int layout) {
        this.context = context;
        this.alldateList = alldateList;
        this.layout = layout;

    }

    @Override
    public int getCount() {
        return alldateList.size();
    }

    @Override
    public T getItem(int position) {
        return alldateList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        AdaViewHolder viewholder = AdaViewHolder.gettags(position, context, parent, layout, convertView);
        couver(viewholder,getItem(position));
        return viewholder.getviewc();
    }
        public abstract void couver(AdaViewHolder ad,T Object);






}
